
<div class="left">
    <div class="title-page">My Posts</div>
    <div class="list-upload">
	<?php
	$this->widget('bootstrap.widgets.TbGridView', array(
	    'id' => 'post-grid',
	    'dataProvider' => $model->search(user()->id),
	    'filter' => $model,
	    'columns' => array(
		array(
		    'header' => 'Type of post',
		    'name' => 'post_type',
		    'type' => 'raw',
		    'value' => function($data) {
			return $data->getType();
		    },
		    'filter' => Posts::getListType()
		),
		array(
		    'name' => 'title',
		    'type' => 'raw',
		    'value' => function($data) {
			return $data->getTitle();
		    }
		),
		array(
		    'header' => 'Date',
		    'name' => 'time_created',
		    'type' => 'raw',
		    'value' => function($data) {
			return date('m-d-Y', strtotime($data->time_created));
		    },
		    'filter' => false
		),
		array(
		    'class' => 'bootstrap.widgets.TbButtonColumn',
		    'template' => '{update}{delete}'
		)
	    ),
	));
	?>
    </div>



</div>
<div class="right">
    <div class="box-right">
	<?php $this->widget('application.widgets.loginbox.LoginBox'); ?>

    </div><!--box-right-->
    <?php $this->widget('application.widgets.ad.Ad') ?>
</div><!--right-->
